#include"stdafx.h"
namespace LK
{
	PException::PException(PString description)throw() :PObject(new Exception(description)) {}
	PException::PException(PString description, PException innerException)throw() :PObject(new Exception(description, innerException)) {}
	PString PException::GetDescription() const { return Ptr()->GetDescription(); }
	PException PException::GetInnerException() const { return Ptr()->GetInnerException(); }

	Exception::Exception(PString description)throw() :description(description), Inner() {}
	Exception::Exception() throw() :description(L"未知异常") {}
	Exception::Exception(const Exception& e)throw() :description(e.description), Inner(e.Inner) {}
	Exception::Exception(PString description, PException innerException)throw() :description(description), Inner(innerException) {}

	Exception::~Exception() {}

	PString Exception::GetDescription() { return description; }
	PException Exception::GetInnerException() { return Inner; }
	PString Exception::ToString()const { return description; }
	bool Exception::Equals(Object const&v)const { return CastPointer<Exception>(&v) != NULL; }


}
